Field of the Invention
This invention relates computer systems, and more particularly, to relocating and initializing a block of memory of the computer system.
Background
In computing systems, the relocation of data from one location of memory to another location of memory may be performed to reduce input/output (I/O) contention of table spaces or arrays belonging to different owners, to separate the data of different applications, and to copy data from one array to another array in an application. Additional reasons for performing data relocation may include a change in resources such as failing hardware components, hot add/removal of hardware components where the components are added/removed while applications are running, a change in availability of hardware resources due to power management techniques, and optimizing load balances.
During the relocation of data, a register is used to perform the data move or the data copy operation. The register may also be used for an initialization of a location of memory, such as an array. Each of the relocation, initialization and movement of data in memory are performed with one or more instructions. Each instruction may utilize the register for writing data into the memory. When a data entity is to be relocated, initialized or moved in memory, and the data entity has a size equal to the width of the register, a single instruction is used to write the data entity into the memory. For example, the register may have an 8-byte width. A single instruction may be used to write a data entity of 8 bytes into the memory using the register.
When a data entity is to be relocated, initialized or moved in memory, but the data entity has a size less than the width of the register, possibly multiple instructions are used to write the data entity into the memory. Continuing with the above example of the 8-byte register, a single instruction may be used to write a data entity with a size that is less than the width of the register and has a size that is a power-of-2 value, such as a 1-byte, 2-byte, or 4-byte entity. Therefore, 3 instructions may be used to write a 7-byte data entity for a relocation, initialization or movement operation. A first instruction is used to write the 4-byte entity. A second instruction is used to write the 2-byte entity. A third instruction is used to write the 1-byte entity. During the write operation by a single instruction for each data entity, one or more applications are waiting. Accordingly, performance of the one or more applications decreases.
In view of the above, efficient methods and systems for efficiently relocating and initializing a block of memory of the computer system are desired.